home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / actlib11.zip / TVTOOLS.ZIP / TEXTF.H < prev    next >
C/C++ Source or Header  |  1993-03-02  |  1KB  |  45 lines

  1. /*  Copyright (C) 1993   Marc Stern  (internet: stern@mble.philips.be)  */
  2.  
  3. #if defined( Uses_TStaticTextf) && !defined( __TStaticTextf )
  4. #define __TStaticTextf
  5.  
  6. #include <stdarg.h>
  7. class TStaticTextf : public TStaticText
  8. {
  9.  
  10. public:
  11.  
  12.     TStaticTextf( const TRect& bounds, const char *fmt, ... );
  13.     TStaticTextf( const ushort x, const ushort y, const char *fmt, ... );
  14.  
  15. private:
  16.  
  17.     virtual void init( const char *fmt, va_list arglist );
  18.     virtual const char *streamableName() const
  19.         { return name; }
  20.  
  21. protected:
  22.  
  23.     TStaticTextf( StreamableInit );
  24.     virtual void write( opstream& );
  25.     virtual void *read( ipstream& );
  26.  
  27. public:
  28.  
  29.     static const char * const near name;
  30.     static TStreamable *build();
  31.  
  32. };
  33.  
  34. inline ipstream& operator >> ( ipstream& is, TStaticTextf& cl )
  35.     { return is >> (TStreamable&)cl; }
  36. inline ipstream& operator >> ( ipstream& is, TStaticTextf*& cl )
  37.     { return is >> (void *&)cl; }
  38.  
  39. inline opstream& operator << ( opstream& os, TStaticTextf& cl )
  40.     { return os << (TStreamable&)cl; }
  41. inline opstream& operator << ( opstream& os, TStaticTextf* cl )
  42.     { return os << (TStreamable *)cl; }
  43.  
  44. #endif  // Uses_TStaticTextf
  45.